﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeRefactoring
{
    public class Figure
    {
        public double width;
        public double height;

        public Figure(double width, double height)
        {
            this.width = width;
            this.height = height;
        }


        public static Figure GetRotatedSize(Figure figure, double rotationAngle)
        {
            return new Figure(Math.Abs(Math.Cos(rotationAngle)) * figure.width +
                              Math.Abs(Math.Sin(rotationAngle)) * figure.height,
                              Math.Abs(Math.Sin(rotationAngle)) * figure.width +
                              Math.Abs(Math.Cos(rotationAngle)) * figure.height);
        }

    }
}
